import React from 'react';
import {BrowserRouter as Router,Switch,Route,Redirect} from 'react-router-dom'
import Login  from './pages/Login/Login';
import Layout from './pages/Layout/Layout';
import Icon from './components/Icon';
import ProfileEdit from '@/pages/Profile/Edit/index'
import './app.scss'

function App() {
  return (
    <div className="App">
      {/* from="/" to="/layout" */}
      <Router>
        <Switch>
          <Redirect from="/" to="/home" exact></Redirect>
          <Route path="/login" component={Login}></Route>
          <Route path="/home" component={Layout}></Route>
          <Route path="/profile/edit" component={ProfileEdit}></Route>
        </Switch>
      </Router>
      <Icon className="someClass" onClick={()=>{console.log('test')}} type="iconBtn_like_sel"
      />
    </div>
  )
}

export default App;
